🤖 fix: stabilize streaming transcript seams#3201
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Updated to fix CI/unit isolation from the MarkdownComponents highlight regression test and hardened frontend base-path initialization against incomplete DOM shims. |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Updated the E2E reasoning-flow expectation to match the new stabilized behavior: reasoning displaced by follow-on answer text remains expanded instead of rendering an ellipsis toggle. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Updated the PR to restore chat-open bottom pinning after the earlier transcript stabilization changes. Local validation is green:
|
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Re-requesting after the active-compaction chat-open bottom-pin fix. |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Re-requesting after replacing the auto-scroll patchwork with the bottom-lock rewrite and adding the idle-chat switch regression. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b1e4a2142
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Addressed the inertial bottom re-lock feedback and resolved the thread. |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Re-requesting after the expanded bash/tool bottom-lock follow-up. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b31f95d29
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Addressed the completed-bash regression by limiting nested bash output pinning to live output only, and fixed the broader expanded-row bottom drift by treating transcript content clicks as layout interactions rather than scroll intent. Targeted scroll tests and |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 01785aa679
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Addressed the anchoring feedback by restoring |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Two updates: (1) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a68652491d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Addressed the perf concern: the rAF loop now only runs while bottom-lock is held. When the user scrolls up and |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86df5ed2bc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Addressed the keyboard guard: scroll keys (PageUp/PageDown/Home/End/Arrows/Space) now mark scroll intent regardless of which transcript descendant has focus, since the browser scrolls the scrollport in those cases anyway. Added regression tests covering both focused-descendant scroll keys and non-scroll keys (which must remain inert). Targeted tests + UI integration tests + |
|
Codex Review: Didn't find any major issues. Keep them coming! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
58176b5 to
ec281aa
Compare
|
@codex review I pushed a test-isolation fix for the unit flake: the new hook tests now use the shared |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd020ebb2a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review I pushed a follow-up for the integration flake: the idle-chat bottom layout test now re-queries the active scrollport after workspace switch before applying mocked metrics, so it no longer depends on whether happy-dom/React preserved or replaced the scrollport node on CI. |
071a867 to
3b42700
Compare
|
@codex review Rebased onto latest |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b42700760
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review I pushed a focused unit-flake hardening pass: Button/Switch tests now bootstrap Radix with the shared DOM helper, and the inline skill rendering test waits for Streamdown's rendered badge output before asserting. Local failing subset and |
|
@codex review Addressed the LayoutStackLane observer mount case by including |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review I pushed another targeted unit hardening: Button/Switch tests no longer assert Radix's transient |
|
Codex Review: Didn't find any major issues. Delightful! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review I pushed a targeted fix for the remaining unit flake: the UserMessageContent composition test no longer waits on Streamdown's asynchronous Markdown badge rendering (covered directly by InlineSkillMarkdown.test) and now asserts only the synchronous slash badge/edit-mode behavior. Local coverage subset and static-check are green. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3d6d2469b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Addressed the bash auto-expand feedback: fresh executing mounts now still take the 300ms debounce unless the tool timestamp shows the bash has already outlived the flash window. Local bash-autoexpand, flaky unit subset, bottom-layout integration, and static checks are green. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5049110663
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Addressed the content-click scroll intent feedback: plain mousedown no longer marks scroll intent, drag/selection marks on mousemove with primary button, and scrollbar/wheel/touch/key behavior remains user-owned. Local autoscroll, bash-autoexpand, flaky unit subset, bottom-layout integration, and static checks are green. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae415c1aa3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Addressed the editable-control scroll-key feedback: scroll keys on transcript text inputs/textareas/contenteditable targets no longer open a transcript scroll-intent window, while non-editable descendant scroll keys still release bottom lock. Local autoscroll, bash-autoexpand, flaky unit subset, bottom-layout integration, and static checks are green. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Reduce maintenance overhead in the chat transcript bottom-lock and bash auto-expand paths after PR #3201. --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `86.28`_ <!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=386.28 -->
## Summary Follow-up cleanup after #3201: trims maintenance-only code in the chat transcript bottom-lock and bash auto-expand paths while preserving the validated behavior. After a 4-lane sub-agent review, this PR also consolidates duplicated scroll-metric test scaffolding and removes a few small dead/indirect code paths. ## Background #3201 stabilized transcript bottom ownership and bash row expansion. This PR keeps that behavior but reduces surface area in the related code paths. Cleanup candidates were split across sub-agent lanes for auto-scroll, bash/tool rows, ChatPane/LayoutStack, and related renderer test helpers; the accepted low-risk findings were consolidated here. ## Implementation - Replaces the bash auto-expand hook's raw latest-bash id input with a direct `hasReplacementStreamingBash` boolean. - Consolidates bash auto-expand timer cleanup into the layout effect and removes the separate unmount-only effect. - Simplifies local Bash row derived state for output/background results. - Removes the unused `observedHeightRef` writes from `LayoutStackLane`. - Drops an unused auto-scroll distance helper. - Removes dead `todoCount` prop plumbing from `ChatInputPane`. - Shares the happy-dom scroll-metric shim between hook and integration tests. - Reuses the scroll-metric helper in the bottom-layout integration test and makes the viewport-resize case actually shrink the viewport. ## Validation - `make fmt` - `bun test src/browser/hooks/useAutoScroll.test.tsx` - `bun test src/browser/features/Tools/Shared/useBashAutoExpand.test.tsx` - `bun test src/browser/components/ChatPane/LayoutStackLane.test.tsx` - `TEST_INTEGRATION=1 bun x jest tests/ui/chat/bottomLayoutShift.test.ts --runInBand --silent` - `make static-check` ## Risks Low. The production changes are small refactors in already-covered paths. The most behavior-adjacent changes are the bash auto-expand hook API and shared test scroll shim, both covered by targeted tests plus `make static-check`. --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$386.28`_ <!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=386.28 -->
Summary
Stabilizes the chat transcript bottom seam during streaming, hydration, workspace switches, idle chat opens, active compaction, and chats with expanded tool panes — and removes the noticeable delay before the latest streaming bash row expands when a chat is opened.
Background
Earlier rewrites already replaced the old multi-path auto-scroll patchwork with a small bottom-lock state machine. The remaining bugs were:
ResizeObserverin time for the next paint.Implementation
useAutoScrollenforces the bottom-lock invariant in arequestAnimationFrameloop instead of relying solely on observer delivery. WhileautoScrollis on, every frame writesscrollTop = scrollHeight - clientHeight(no-op when already there). This makes the lock independent of any single layout signal source, so async settling inside expanded tool panes can no longer leave the transcript a few pixels above the bottom.BashToolCallextracts auto-expand intouseBashAutoExpand. On the first effect run after mount, if the bash is already the latest streaming bash, the row expands synchronously in a layout effect — no perceptible delay on chat-open. New in-chat bash transitions still get the 300 ms flash protection.LayoutStackLaneremains reservation/alignment-only; transcript scroll anchoring is still disabled inside bottom-lock and re-enabled in manual reading mode so users reviewing older messages keep their viewport stable when async highlights settle.Validation
bun test src/browser/hooks/useAutoScroll.test.tsxbun test src/browser/features/Tools/Shared/useBashAutoExpand.test.tsxTEST_INTEGRATION=1 bun x jest tests/ui/chat/bottomLayoutShift.test.ts --runInBandmake static-checkmake testRisks
Transcript scrolling is sensitive to browser timing. The frame-aligned approach trades a small per-frame layout read while bottom-locked for stronger correctness guarantees. The auto-expand split keeps the existing flash-prevention behavior for in-chat bashes; only chat-open is changed to expand synchronously before paint.
Generated with
mux• Model:anthropic:claude-opus-4-7• Thinking:max• Cost:$323.49